<?php
/**
 * CreateUser: zlh
 * CreateTime: 2022/1/21 18:41
 * Remark:
 */

namespace App\Http\Requests\Dictionary;

use App\Http\Requests\BaseRequests;

class AddDictionaryPost extends BaseRequests
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'dictionary_name' => "required",
            'dictionary_value' => "required",
            'dictionary_key' => "required",
        ];
    }

    public function messages()
    {
        return [
            'dictionary_name.required' => "字典名称不能为空",
            'dictionary_value.required' => "字典值不能为空",
            'dictionary_key.required' => "字典key不能为空",
        ];
    }
}